package cn.wen.springframework.context.event;import cn.wen.springframework.beans.factory.BeanFactory;import cn.wen.springframework.context.ApplicationEvent;import cn.wen.springframework.context.ApplicationListener;/** * @ClassName: SimpleApplicationEventMulticaster * @Author: 小飞 * @Date: 2023/3/28 22:24 * @Description: 事件广播的实现类 */public class SimpleApplicationEventMulticaster extends AbstractApplicationEventMulticaster {    public SimpleApplicationEventMulticaster(BeanFactory beanFactory) {        setBeanFactory(beanFactory);    }    @SuppressWarnings("unchecked")    @Override    public void multicastEvent(final ApplicationEvent event) {        for (final ApplicationListener listener : getApplicationListeners(event)) {            listener.onApplicationEvent(event);        }    }}